package org.onionframework.faces.model;

import java.util.List;

public class DefaultPagedDataModel extends PagedDataModel {

	private DataProvider dataProvider;
	
	public DefaultPagedDataModel(int count,DataProvider dataProvider){
		super();
		super.count = count;
		this.dataProvider = dataProvider;
	}
	
	@Override
	public int getCount() {
		return super.count;
	}

	@Override
	public List<?> getList(int firstRow, int maxResults) {
		return this.dataProvider.getList(firstRow, maxResults);
	}

}
